﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using ClassLibrarySample;

namespace EightBallWin
{
    public partial class mainForm : Form
    {
        EightBall eball;

        public mainForm()
        {
            eball = new EightBall();
            eball.EightBallMessageReady += new EightBallMessageHandler(eball_EightBallMessageReady);
            InitializeComponent();

            txtResponseMessage.Text = "";
        }

        void eball_EightBallMessageReady(object sender, EventArgs e)
        {
            txtResponseMessage.Text = eball.Message;
            this.Refresh();
        }

        private void btnShake_Click(object sender, EventArgs e)
        {
            eball.Shake();
        }
    }
}
